public class TestJavaStructs {
    public static void main(String[] args){
        int [] a={1,2,3,4,5,6,7,32,312,4};
        System.out.println("HelloWorld!");
        System.out.println(reverse1(a));

    }
    public static void fzArray(int [] array){
            int temp=0;
        for (int start=0,end=array.length-1;start<=end;start++,end--){
            temp=array[start];
            array[start]=array[end];
            array[end]=temp;
        }
        System.out.println(array);
    }
    public static int[] reverse1(int[] arr){
        int n=arr.length;//申请4个字节
        int temp;//申请4个字节
        for(int start=0,end=n-1;start<=end;start++,end--){
            temp=arr[start];
            arr[start]=arr[end];
            arr[end]=temp;
        }
        return arr;
    }

}
//我开辟的反转数组方法出错 实现不了反转的功能

